package com.ylc.service.impl;

import com.ylc.domain.Users;
import com.ylc.mapper.UsersMapper;
import com.ylc.service.UsersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @Author: ylc
 * @Description: 业务逻辑层的实现类
 * @Date Created in 2022-07-17 15:05
 */
@Service    // 交给Spring框架去创建业务逻辑层对象
public class UsersServiceImpl implements UsersService {
    @Autowired
    private UsersMapper usersMapper;

    // 交给Spring去依赖注入，提供setXXX()接口
    public void setUsersMapper(UsersMapper usersMapper) {
        this.usersMapper = usersMapper;
    }

    @Override
    public int insert(Users user) {
        return usersMapper.insert(user);
    }
}
